package cn.hujin.hujindemo.xiaoniao;

/**
 * Description:
 * Copyright (c) Department of Research and Development/Beijing/THZK.
 * All Rights Reserved.
 *
 * @version 1.0  2023/12/26 14:26  by胡津（hujin@thzk.cn）创建
 */
import javax.swing.*;
import java.awt.*;
public class Ground {
    Image image;
    int x,y;//位置
    int width,height;
    //地面初始化
    public Ground() throws Exception
    {
        image =new ImageIcon("images/ground.png").getImage();
        width=image.getWidth(null);
        height=image.getHeight(null);
        x=0;
        y=500;
    }
    //左移
    public void step()
    {
        x-=4;
        if(x<=-109)
        {
            x=0;
        }
    }
}


